﻿using System;
using System.Collections.Generic;
using System.Linq;
using Autodesk.Revit.DB;

namespace ExtendedFilter.ExtendedFilter
{
	public abstract class ItemData
	{
		public abstract List<Element> GetSelectElements(FilterType filterType);

		public abstract List<Element> GetAllElements();

		public abstract void SetSelected(bool selected);

		protected List<Element> Unique(List<Element> elements)
		{
			List<Element> list = new List<Element>();
			foreach (Element item in (from li in elements
			select li).Distinct<Element>())
			{
				list.Add(item);
			}
			return list;
		}
	}
}
